package com.jiayinlending.jiayindai.activity.mine.loanrecord;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.OrientationHelper;
import android.support.v7.widget.RecyclerView;

import com.jiayinlending.jiayindai.R;
import com.jiayinlending.jiayindai.activity.base.BaseActivity;
import com.jiayinlending.jiayindai.adapter.LoanRecordAdpater;
import com.jiayinlending.jiayindai.net.bean.Info;

import java.util.ArrayList;

import butterknife.Bind;
import butterknife.ButterKnife;

public class LoanRecordActivity extends BaseActivity {

    @Bind(R.id.recyler_loan_record)
    RecyclerView recylerLoanRecord;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ButterKnife.bind(this);
        getToolbarTitle().setText("借款记录");
        getSubTitle().setText("");
        initrecyler();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_loan_record;
    }

    private void initrecyler() {

        ArrayList<Info> list2 = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            list2.add(new Info());
        }
        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        recylerLoanRecord.setLayoutManager(layoutManager);
        layoutManager.setOrientation(OrientationHelper.VERTICAL);
        recylerLoanRecord.setAdapter(new LoanRecordAdpater(this, list2));
    }

}
